/*fun main() {
    lateinit var flag: String
    loginMethod(false) {
        flag = it.toString()
    }
    println(flag)
}*/
fun main() {
    var name : String? = "name"
    var length = name.myRun {
         this?.length
    }
    println(length)
}
fun <T, R> T.myRun(mm : () -> R) : R {
    return mm()
}